<extend name="Public:layout"/>
<block name="content">
    <div class="panel admin-panel">
        <div class="panel-head"><strong class="icon-reorder">管理员列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
        <div class="padding border-bottom">
            <ul class="search" style="padding-left:10px;">
                <li> <a class="btn btn-primary icon-plus" href="{:U('add')}"> 添加管理员</a> </li>
                <li>搜索：</li>
                <li>
                    <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block">
                    <a href="javascript:void(0)" class="btn btn-primary icon-search" onclick="changesearch()"> 搜索</a></li>
            </ul>
        </div>

        <table class="table table-hover text-center">
            <thead>
            <tr>
                <th width="100" style="text-align:left; padding-left:20px;">ID</th>
                <th>用户</th>
                <th>角色</th>
                <th>手机号</th>
                <th>最后登录时间</th>
                <th>最后登录IP</th>
                <th>创建时间</th>
                <th>状态</th>
                <th width="310">操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo">
                <tr>
                    <td style="text-align:left; padding-left:20px;">{$vo.user_id}</td>
                    <td>{$vo.user_login}</td>
                    <td>{$vo.role_name}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$vo.login_time|sp_date}</td>
                    <td>{$vo.login_ip}</td>
                    <td>{$vo.create_time|sp_date}</td>
                    <td>{$vo['status'] ? '正常' : '禁用'}</td>
                    <td>
                        <div class="btn-group">
                            <a class="btn btn-primary" href="{:U('edit', 'user_id='.$vo['user_id'])}"><span class="icon-edit"></span> 修改</a>
                            <a class="btn btn-info ajax-click" href="javascript:void(0)" data-url="{:U('ban', array('user_id'=>$vo['user_id'], 'status'=>!$vo['status']))}"><span class="icon-edit"></span> {$vo['status'] ? '禁用' : '启用'}</a>
                            <a class="btn btn-danger ajax-click" href="javascript:void(0)" data-url="{:U('del', 'user_id='.$vo['user_id'])}"><span class="icon-trash-o"></span> 删除</a>
                        </div>
                    </td>
                </tr>
            </volist>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="8"><div class="pagelist"> {$page} </div></td>
            </tr>
            </tfoot>
        </table>
    </div>
</block>